/**
 * kl yy-ds @2021
 */
package com.cxps.server.config;

import com.alipay.api.AlipayClient;
import com.alipay.api.DefaultAlipayClient;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * 构建支付宝支付客户端
 * @author YouCai.Liu
 * @since 2021/11/9
 * ...
 */
@Component
public class BuildAlipayClient {

    @Bean
    public AlipayClient alipayClient(){
        return new DefaultAlipayClient(AlipayConfig.URL_DEV, AlipayConfig.APP_ID, AlipayConfig.RSA_PRIVATE_KEY,
                AlipayConfig.FORMAT, AlipayConfig.CHARSET, AlipayConfig.ALIPAY_PUBLIC_KEY, AlipayConfig.SIGN_TYPE);
    }

}
